/*
 * Created on Apr 7, 2004
 *
 * To change the template for this generated file go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
package com.ba360.portal.database.dbo;

import java.sql.Date;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.TimeZone;

import com.ba360.portal.util.Formatter;

/**
 * @author ronat
 * 
 * To change the template for this generated type comment go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
public class Classifieds {

	private int ad_id, advId;

	private int category_id;

	private int parent_category_id;

	private int city_id;

	private String price;

	private double member_id;

	private String name, adTitle;

	private String parent_category_name, parentCategoryName;

	private String sub_category_name, subCategoryName;

	private String city;

	private String ad_description;

	private String contact_name, contactName;

	private String contact_number;

	private Timestamp date_posted, datePosted;

	private Date active_until;

	private String contact_email;

	private String house_type;

	private String sqft;

	public String ADV_ID = "AD_ID";

	public String ADV_CATTYPE = "CATEGORY_ID";

	public String ADV_PRICE = "Price";

	public String ADV_CITY = "CITY_ID";

	public String ADV_TITLE = "NAME";

	public String ADV_USERID = "MEMBER_ID";

	public String ADV_CATID = "Category_Id";

	public String ADV_TRADEDESC = "AD_DESCRIPTION";

	public String ADV_CONTACTNAME = "CONTACT_NAME";

	public String ADV_CONTACTNUM = "CONTACT_NUMBER";

	public String ADV_DATE = "DATE_POSTED";

	public String ADV_ACTIVEUNTIL = "ACTIVE_UNTIL";

	public String ADV_CONTACTEMAIL = "CONTACT_EMAIL";

	public String ADV_HOUSETYPE = "HOUSE_TYPE";

	public String ADV_SQFT = "SQFT";

	//	private

	public Classifieds() {
		super();
	}

	public void setAdvId(int advid) {
		this.ad_id = advid;
		this.advId = advid;
	}

	public int getAdvId() {
		return ad_id;
	}

	public void setPrice(String price) {
		this.price = price;
	}

	public String getPrice() {

		return "Rs"+price;
	}

	public void setCatId(int category_id) {
		this.category_id = category_id;
	}

	public int getCatId() {
		return category_id;
	}

	public void setParentCatId(int parent_category_id) {
		this.parent_category_id = parent_category_id;
	}

	public int getParentCatId() {
		return parent_category_id;
	}

	public void setCityId(int city_id) {
		this.city_id = city_id;
	}

	public int getCityId() {
		return city_id;
	}

	public void setMemberId(double member_id) {
		this.member_id = member_id;
	}

	public double setMemberId() {
		return member_id;
	}

	public void setAdTitle(String name) {
		this.name = name;
	}

	public String getAdTitle() {
		return name;
	}

	public void setParentCategoryName(String parent_category_name) {
		this.parent_category_name = parent_category_name;
		this.parentCategoryName = parent_category_name;
	}

	public String getParentCategoryName() {
		return parent_category_name;
	}

	public void setSubCategoryName(String sub_category_name) {
		this.sub_category_name = sub_category_name;
		this.subCategoryName = sub_category_name;
	}

	public String getSubCategoryName() {
		return sub_category_name;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getCity() {
		return city;
	}

	public void setAdDesc(String ad_description) {
		this.ad_description = ad_description;
	}

	public String getAdDesc() {
		return Formatter.addNewLine(ad_description,75);
	}

	public void setContactName(String contact_name) {
		this.contact_name = contact_name;
		this.contactName = contact_name;
	}

	public String getContactName() {
		return contact_name;
	}

	public void setContactNumber(String contact_number) {
		this.contact_number = contact_number;
	}

	public String getContactNumber() {
		return contact_number;
	}

	public void setContactEmail(String contact_email) {
		this.contact_email = contact_email;
	}

	public String getContactEmail() {
		return contact_email;
	}

	public void setHouseType(String house_type) {
		this.house_type = house_type;
	}

	public String getHouseType() {
		return house_type;
	}

	public void setSqFt(String sqft) {
		this.sqft = sqft;
	}

	public String getSqFt() {
		return sqft;
	}

	public void setDatePosted(Timestamp date_posted) {
		this.date_posted = date_posted;
		this.datePosted = date_posted;
	}

	public String getDatePosted() {
		SimpleDateFormat sdf = new SimpleDateFormat("MMM,dd");
		TimeZone tz = TimeZone.getTimeZone("GMT+05:30");
		sdf.setTimeZone(tz);
		return sdf.format(date_posted);
		//return date_posted;
	}

	public void setActiveDate(Date active_until) {
		this.active_until = active_until;
	}

	public Date getActiveDate() {
		return active_until;
	}

}